<template>
  <h1>事件绑定指令</h1>
  <button @click="f">按钮1</button>
  <button v-on:click="f">按钮2</button>
  <input type="text" placeholder="请输入您想搜索的商品" v-model="search" @keydown.enter="f2">
</template>
<script setup>
  import {ref} from "vue";

  const f = () => {
    alert('按钮被点击了');
  }
  const search = ref('');
  const f2 = () => {
    alert('您输入的内容是：' + search.value);
  }
</script>


<style scoped>

</style>